import request from '@/utils/request'

// 获取全部信息
export function getRepairAllApi() {
    return request({
        url: '/community',
        method: 'get',
    })
}

// 获取报修列表
export function getRepairListApi(params) {
    return request({
        url: '/service/repair',
        method: 'get',
        params
    })
}

// 获取报修详情
export function getRepairInfoApi(id) {
    return request({
        url: '/service/repair/' + id,
        method: 'get',
    })
}

// 新增数据
export function addRepairApi(data) {
    return request({
        url: '/service/repair',
        method: 'post',
        data
    })
}

// 修改数据
export function editRepairApi(data) {
    return request({
        url: '/service/repair/' + data.id,
        method: 'put',
        data
    })
}

// 删除数据
export function delRepairApi(id) {
    return request({
        url: '/service/repair/' + id,
        method: 'delete',
    })
}